//
//  AllOrderListTableViewCell.m
//  ChineseCollegeStudentsNetwork
//
//  Created by 刘喆 on 2019/3/6.
//  Copyright © 2019年 刘喆. All rights reserved.
//

#import "AllOrderListTableViewCell.h"

@implementation AllOrderListTableViewCell

#pragma mark - Init
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createSubviews];
    }
    return self;
}

#pragma mark - Subviews
#pragma amrk layout subviews
- (void)layoutSubviewsInView {
    
    [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        //make.width.mas_equalTo(200);
        make.centerY.equalTo(self);
    }];
    
    [_accessoryImgv mas_makeConstraints:^(MASConstraintMaker *make) {
        //make.left.equalTo(self.titleLbl.mas_right).offset(2);
        make.right.mas_offset(-20);
        make.width.height.mas_equalTo(10);
        make.centerY.equalTo(self);
    }];
}

#pragma mark create subviews
- (void)createSubviews {
    
    [self.contentView addSubview:self.titleLbl];
    [self.contentView addSubview:self.accessoryImgv];
    
    [self layoutSubviewsInView];
}



- (UILabel *)titleLbl {
    if (!_titleLbl) {
        _titleLbl = [[UILabel alloc] init];
        _titleLbl.font = [UIFont systemFontOfSize:13];
        _titleLbl.textColor = kRGB(153, 153, 153, 1);
    }
    return _titleLbl;
}

- (UIImageView *)accessoryImgv {
    if (!_accessoryImgv) {
        _accessoryImgv = [[UIImageView alloc] init];
        _accessoryImgv.image = [UIImage imageNamed:@"mine_arrow_r"];
    }
    return _accessoryImgv;
}


@end
